package com.medical.sys.mapper;

import com.medical.common.paginator.domain.PageBounds;
import com.medical.sys.model.User;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;
@Mapper
public interface UserMapper {
    int deleteByPrimaryKey(String id);

    int insert(User record);

    User selectByPrimaryKey(String id);

    User selectByUsername(String username);

    List<User> selectByQuery(Map<String, Object> params, PageBounds page);

    List<User> findByOrgId(Map<String, Object> params, PageBounds page);

    List<User> selectByRoleId(String roleId);

    List<User> selectByOrgId(String orgId);

    List<User> selectAll(Boolean administrator);

    int updateByPrimaryKey(User record);
    
    int updateByPrimaryKeySelective(User record);
    
    User selectByOpenId(String openId);
    
    User selectByOpenIdAndOrgId(String openId, String orgId);
    
    List<User> selectByRoleIdAndOrgId(String roleId, String orgId);
    
    List<User> selectByRoleIdAndOrgIds(String roleId, String orgId);
    
    User selectByPhone(String phone);
}